package cn.edu.neusoft.yyd208.foodorder.model;

import cn.edu.neusoft.yyd208.foodorder.bean.RegisterBean;
import cn.edu.neusoft.yyd208.foodorder.iface.PurchIface;
import cn.edu.neusoft.yyd208.foodorder.listener.TListener;
import cn.edu.neusoft.yyd208.foodorder.service.Service;
import retrofit2.Call;
import retrofit2.Retrofit;



public class PurchModel extends RetrofitBaseModel implements PurchIface<RegisterBean> {
    private Service service;
    private Retrofit retrofit;
    public PurchModel(){
        retrofit=getRetrofit();
    }

    @Override
    public void getPurchMessage(String user_id, String food_id, String num, String sum, String suggesttime, TListener<RegisterBean> tListener) {
        service=getService();
        Call<RegisterBean> call=service.getregister(user_id,food_id,num,sum,suggesttime);
        callenqueue(call,tListener);
    }
}
